<script setup lang='ts'>
import {  ref } from 'vue';
import {  getTeacherList } from '@/api/interfaceApi/https';
import teacherSchedule from "@/components/TeacherSchedule/teacherSchedule.vue"
let selectedValue = ref('500515118002606080');
let teacherList = ref([]);
getTeacherList().then((res: { code: number; rows: never[]; })=>{
    if (res.code === 200) {}
    teacherList.value = res.rows;
});

</script>

<template>
    <div class='teacher-box'>
        <div>
            <span>当前咨询师：</span>
            <el-select
                v-model="selectedValue"
                placeholder="请选择咨询师"
                size="large"
                style="width: 240px"
            >
                <el-option
                    v-for="item in teacherList"
                    :key="item.id"
                    :label = "item.name"
                    :value="item.id"
                />
            </el-select>
        </div>
        <teacher-schedule :itemId='selectedValue'></teacher-schedule>
    </div>

</template>

<style scoped lang='scss'>
.teacher-box {
    padding: 30px 20px;
}
</style>
